package com.spring.boot.quartz.jobs;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * 时间打印定时任务
 *
 * @author LiKun
 * @date 2021/7/30 17:19
 */
@Component("printQuartzJob")
public class PrintQuartzJob extends QuartzJobBean {
    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        System.out.println(LocalDateTime.now());
    }
}
